package com.izhouy.kafka.config;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Component;

/**
 * @title: KafkaConsumer
 * @Decription: 消费者:使用@KafkaListener注解,可以指定:主题,分区,消费组
 * @CreateDate: 2020/11/27 17:36
 * @author: izhouy
 */
@Component
public class KafkaConsumer {

    @KafkaListener(topics = {"test"})
    public void receive(String message){
        System.out.println("app_log--消费消息:" + message);
    }

}
